﻿using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using GalaSoft.MvvmLight.Messaging;

namespace SerienNewsReaderWp7
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void menuItemFilter_Click(object sender, System.EventArgs e)
        {
            ApplicationBarMenuItem menuItem = null;

            if (sender is ApplicationBarMenuItem)
            {
                menuItem = sender as ApplicationBarMenuItem;
            }
            else
            {
                return;
            }

            if (menuItem != null)
            {
                Messenger.Default.Send<string>(menuItem.Text);
            }
        }
    }
}
